package com.ys.controller.api.outer;

import com.ys.timer.TimerFinancesApiDataDaily;
import com.ys.timer.TimerFinancesEventGroupsOpDaily;
import com.ys.timer.TimerTPAmazonShopProductDaily;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
@RequestMapping("/api/outer/financesData")
public class ApiOuterFinancesController {

    private static final Logger logger = LoggerFactory.getLogger(ApiOuterFinancesController.class);

	@Autowired
	private TimerFinancesApiDataDaily timerFinancesApiDataDaily;

	@Autowired
	private TimerFinancesEventGroupsOpDaily timerFinancesEventGroupsOpDaily;

	@Autowired
	private TimerTPAmazonShopProductDaily timerTPAmazonShopProductDaily;

	@RequestMapping("/test8")
	@ResponseBody
	public void test8(HttpServletRequest request, HttpServletResponse response) throws InterruptedException {
		timerFinancesApiDataDaily.getFinancesApi();
	}

	@RequestMapping("/test7")
	@ResponseBody
	public void test7(HttpServletRequest request, HttpServletResponse response) throws InterruptedException {
		timerFinancesApiDataDaily.getFinancesInfo();
	}


	@RequestMapping("/test2")
	@ResponseBody
	public void test2(HttpServletRequest request, HttpServletResponse response) throws InterruptedException {
		timerTPAmazonShopProductDaily.getAmazonSalesTrafficReportO();
	}

	@RequestMapping("/test1")
	@ResponseBody
	public void test1(HttpServletRequest request, HttpServletResponse response) throws Exception {
		timerFinancesEventGroupsOpDaily.getGroupsOp1();
	}
}
